package com.xs;

import java.io.IOException;

import org.apache.log4j.Logger;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.xs.service.IUserService;

/**
 * @Title: <P>App.java</P>
 * @Package <P>com.xs</P>
 * @Description: <P>xml方式配置</P>
 * @author renweiping
 * @date 2019年2月25日 下午4:20:36
 * @version 1.0
 */

public class ConsumerXmlMain {

	public static Logger LOG = Logger.getLogger(ConsumerXmlMain.class);
	public static void main(String[] args) throws IOException {
		
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"consumer.xml"});
        IUserService userService =  (IUserService) context.getBean("demoService");
/*        IUserService userService1 =  (IUserService) context.getBean("demoService1");*/
/*        IUserService userService2 =  (IUserService) context.getBean("demoService2");*/
        LOG.info(userService.sayHello(" nihao "));
/*        LOG.info(userService1.sayHello(" nihao "));*/
/*        LOG.info(userService2.sayHello(" nihao "));*/
        context.close();
        
       // System.in.read(); // 按任意键退出
	}

}
